'use strict';

/**
 * @param {Egg.Application} app - egg application
 */

module.exports = app => {
  const {
    router,
    controller
  } = app;
  router.get('/', controller.home.index);
  router.post('/s', controller.home.s);
  router.get('/sina', controller.home.sina);
  //娄方信 首页数据请求
  router.get('/test', controller.home.test);
  router.get('/picture',controller.home.picture)
  // 购车请求---------刘佳雨
  router.get('/car', controller.car.addgoods);//添加商品
  router.get('/addAddress', controller.car.addAddress);//添加地址
  router.get('/addcar', controller.car.addgoods);//添加到购物车
  router.get('/usercar', controller.car.usercar);//展示购物车
  router.get('/getParts', controller.car.getParts)//获取配件
  router.get('/deletGoodscar', controller.car.deletGoodscar)//获取购物车商品
  router.get('/serchGoods', controller.car.serchGoods)//搜索商品
  router.get('/getCake', controller.car.getCake)//获取蛋糕
  router.get('/getnowGoods', controller.car.getnowGoods)//获取当前点击的
  
  // 登录注册---------雷乔楚
  router.get("/verfy", controller.login.verfy)//获取验证码
  router.post("/login", controller.login.login);//用户登录
  router.post("/register",controller.login.register)//用户注册
  router.post("/choseImg",controller.user.choseImg)//用户上传头像
  router.get("/getUserinfo",controller.user.getUserinfo)//获取用户信息
  router.get("/keepUserinfo",controller.user.keepUserinfo)//保存用户信息

  // 商品信息------------陆松
  
  

  router.get("/getlabel",controller.cake.getlabel)//获取商品标签
  router.get("/getscene",controller.cake.getscene)//获取场景
  router.get("/gettaste",controller.cake.gettaste)//获取商品口味




  router.get("/myOrder",controller.user.myOrder) // 获取用户的所有订单
  router.get("/getAccount",controller.user.getAccount) //获取用户的账户信息
  router.get("/canclePay",controller.user.canclePay)//取消订单
  router.get("/completePay",controller.user.completePay) // 支付订单
  router.get("/modBalance",controller.user.modBalance)//支付订单后修改余额

  //root 
  router.get("/userinfo", controller.root.userinfo)
  router.get("/useraccountall", controller.root.useraccountall)
  router.get("/carall", controller.root.carall)
  router.get("/dingdanall", controller.root.dingdanall)
  router.get("/tezheng", controller.root.tezheng)
  router.get("/details_page", controller.root.details_page)
  router.get("/details_img", controller.root.details_img)

  router.get("/goods", controller.root.goods)

  router.get("/cmtde", controller.root.cmtde)
 
};